home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
fg
/
fgl402c
/
exc.arj
/
TEMP
/
14-08.C
< prev
next >
Wrap
Text File
|
1995-01-20
|
929b
|
49 lines
#include <fastgraf.h>
#include <stdio.h>
#include <stdlib.h>
void main(void);
void main()
{
int old_mode;
int buttons, count;
int x, y;
char string[25];
fg_initpm();
old_mode = fg_getmode();
fg_setmode(fg_automode());
if (fg_mouseini() < 0)
{
fg_setmode(old_mode);
fg_reset();
exit(1);
}
fg_setcolor(15);
fg_rect(0,fg_getmaxx(),0,fg_getmaxy());
fg_mousevis(1);
do
{
fg_waitfor(54);
fg_mousebut(1,&count,&x,&y);
fg_mousepos(&x,&y,&buttons);
sprintf(string,"X=%3d Y=%3d count=%4d",x,y,count);
fg_mousevis(0);
fg_setcolor(15);
fg_rect(0,fg_xconvert(25),0,fg_yconvert(1));
fg_setcolor(0);
fg_locate(0,0);
fg_text(string,24);
fg_mousevis(1);
fg_mousebut(2,&count,&x,&y);
}
while (count == 0);
fg_setmode(old_mode);
fg_reset();
}